import { createStore } from "vuex";

export default createStore({
  state: {
	  userInfo:''
  },
  getters: {},
  mutations: {
	  // 保存用户数据
	  setUserInfo(state,userInfo) {
		  
	      if (userInfo) {
	          state.userInfo = userInfo
			  console.log(typeof(userInfo))
			  console.log(typeof(state.userInfo))
	      } else {
	          // 清空退出
	          state.userInfo = "";
	      }
	  }
  },
  actions: {
	  
  },
  modules: {},
});
